home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
DMTDEMOS
/
GETATTR.DEM
< prev
next >
Wrap
Text File
|
1994-07-02
|
1KB
|
53 lines
program GetAttrSample;
uses crt, DMT;
var
Attributes : word;
FileName : string;
begin
Color( 7, 0 );
clrscr;
write( 'Get attributes for, Enter filename : ' );
readln( FileName );
GetAttr( FileName, Attributes ); { Call GetAttr procedure }
if ( ErrFlag ) then
begin
writeln( #7 );
writeln( ShowError( GetErrCode ) );
end
else
begin
writeln;
writeln( 'Current Attributes: ' );
writeln;
if ( Attributes and $20 ) = $20 then
writeln( ' Archive' ); { Backup required }
if ( Attributes and $10 ) = $10 then
writeln( ' Subdirectory' );
if ( Attributes and $02 ) = $02 then
writeln( ' Hidden' );
if ( Attributes and $01 ) = $01 then
writeln( ' Read-Only' );
if ( Attributes and $04 ) = $04 then
writeln( ' System' );
if ( Attributes and $08 ) = $08 then
writeln( ' Volume Label' );
if ( Attributes = $00 ) then
writeln( ' Normal' );
end;
GetEnter;
end.